#include <iostream>
#include <string>
#include <boost/smart_ptr/shared_ptr.hpp>

class Person {
    public:
        Person(const char* name, int age): _name(name), _age(age) {
            std::cout << "Person()" << std::endl;
        }
        ~Person() {
            std::cout << "~Person()" << std::endl;
        }
        void print() {
            std::cout << "name:" << _name << ", age:" << _age << std::endl;
        }
    private:
        std::string _name;
        int _age;
};

void ok() {
    boost::shared_ptr<Person> p(new Person("allen", 29));
    p->print();
}

int main(int argc, char* argv[]) {
    //Person("luffy", 19);
    ok();
    std::cout << "---------- End ----------" << std::endl;
    return 0;
}

